﻿using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace MYData.Entity.DTO.ApiEntity.OutPut
{
    public class FundingSubject_RelationOutputDto
    {
        /// <summary>
        ///项目预算模板与项目关系表主键
        /// </summary>
        [Key]
        [Display(Name = "项目预算模板与项目关系表主键")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string Id { get; set; } = new Snowflake.Core.IdWorker(1, 1).NextId().ToString();

        /// <summary>
        ///经费模板Id
        /// </summary>
        [Display(Name = "经费模板Id")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string templateId { get; set; }

        /// <summary>
        ///经费科目Id
        /// </summary>
        [Display(Name = "经费科目Id")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string subjectId { get; set; }

        /// <summary>
        ///项目Id
        /// </summary>
        [Display(Name = "项目Id")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string projectId { get; set; }

        /// <summary>
        ///专项经费
        /// </summary>
        [Display(Name = "专项经费")]
        [DisplayFormat(DataFormatString = "10,2")]
        [Column(TypeName = "decimal")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public decimal directFunding { get; set; }

        /// <summary>
        ///配套经费
        /// </summary>
        [Display(Name = "配套经费")]
        [DisplayFormat(DataFormatString = "10,2")]
        [Column(TypeName = "decimal")]
        [Editable(true)]
        public decimal? overheadFunding { get; set; }

        /// <summary>
        ///预算科目名称
        /// </summary>
        [Display(Name = "预算科目名称")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string budgetitemName { get; set; }

        /// <summary>
        ///预算科目父级Id
        /// </summary>
        [Display(Name = "预算科目父级Id")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string partentId { get; set; }

        /// <summary>
        ///预算科目类别(直接费用、间接费用)
        /// </summary>
        [Display(Name = "预算科目类别(直接费用、间接费用)")]
        [Column(TypeName = "bool")]
        [Editable(true)]
        public bool? budgetType { get; set; }

        /// <summary>
        ///预算科目状态(0代表启用1代表未启用)
        /// </summary>
        [Display(Name = "预算科目状态(0代表启用1代表未启用)")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int budgetiState { get; set; }
    }
}
